package main

import "fmt"

func main() {
	a := []int{1, 2, 3}
	test(&a)
	fmt.Println(a) //[1 2 3 4 5 6]

	b := []int{1, 2, 3}
	test01(b)
	fmt.Println(b) //[1 10 3]
}

func test(arr *[]int) {
	*arr = append(*arr, 4, 5, 6)
}

func test01(arr []int) {
	arr[1] = 10
	arr = append(arr, 4, 5, 6)
	fmt.Println(arr) //[1 10 3 4 5 6]
}
